<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    JSONObject jsonObject = new JSONObject();
    RecordSet rs = new RecordSet();
    RecordSet rs1 = new RecordSet();
    String billid = request.getParameter("billid");
    rs.executeQuery("select *from uf_arc_borrowing_dt1 where mainid=?", billid);
    while (rs.next()) {
        String arc_dangan = rs.getString("arc_dangan");
        String folder_title = rs.getString("folder_title");
        rs1.executeUpdate("insert into uf_borrow_car(modedatacreater,MODEUUID,own_form_id,folder_title,category_code,class_name,state,borrow_person,formid)\n" +
                " values(1,newid(),?,?,'','',0,1,-1)",arc_dangan, folder_title);
    }
    rs1.executeQuery("select max(id) from uf_borrow_car");
    rs1.next();
    String flag = rs1.getString(1);
    //add by  wx
    //需求：需要将原来的 预计归还日期时间 赋值给信的续签流程里面
    String return_date = "";
    String return_time = "";
    rs.executeQuery("select return_date,return_time from uf_arc_borrowing where id=?", billid);
    while(rs.next()){
        return_date = Util.null2String(rs.getString("return_date"));
        return_time = Util.null2String(rs.getString("return_time"));
    }

//    jsonObject.put("flag", flag);
//    out.println(jsonObject);
%>
<script>
    window.location="/spa/workflow/static4form/index.html#/main/workflow/req?iscreate=1&workflowid=179&field9854=<%=return_date%>&field9852=<%=return_time%>&field9856=<%=flag%>&field9860=1"
</script>